export interface IWorkDetail {
  _id: string
  uuid: string
  title: string
  desc: string
  coverImg: string
  isTemplate: boolean
  isPublic: boolean
  isHot: boolean
  author: string
  copiedCount: number
  status: number
  user: string
  channel: any[]
  createdAt: string
  updatedAt: string
  id: number
  content: { props: Object; components: any[] }
}

export interface IGetWorkTemplateListProps {
  pageIndex: number
  pageSize: number
  title?: string
  isTemplate?: boolean
}

export interface ICreateWorkProps {
  title: string
  desc: string
  coverImg: string
  content: any
}

export interface IPublishWorkOrTemplateProps {
  id: string
  isPublic?: boolean
  isTemplate?: boolean
}

export type ChannelList = {
  name: string
  id: string
  channelUrl: string
}

export interface IChannelListData {
  list: ChannelList[]
  total: number
}

export interface ICreateChannelData extends IWorkDetail {
  channel: ChannelList[]
  total: number
}

export const defaultCreateWorkProps: ICreateWorkProps = {
  title: '未命名作品',
  desc: '请输入作品描述',
  coverImg: 'test',
  content: {},
}
